<template>
  <div class="header">
    <div class="employees-header clear">
      <div class="header-left">
        <i class="el-icon-search"></i>
        <span>筛选查询</span>
      </div>
      <div class="header-right">
        <span @click="shouqi" class="shou"
          ><i
            :class="{ 'el-icon-arrow-up': tab, 'el-icon-arrow-down': !tab }"
          ></i
          >收起筛选</span
        >
        <el-button @click="sel">查询结果</el-button>
      </div>
    </div>
    <div class="header-from" :class="{ 'header-from1': tab }">
      <el-form :inline="true" :model="caigou" class="demo-form-inline">
        <el-form-item label="创建日期:">
          <el-col :span="11">
            <el-date-picker
              type="date"
              placeholder="选择日期"
              v-model="caigou.date1"
              style="width: 100%"
            ></el-date-picker>
          </el-col>
          <el-col class="line" :span="2">-</el-col>
          <el-col :span="11">
            <el-time-picker
              placeholder="选择时间"
              v-model="caigou.date2"
              style="width: 100%"
            ></el-time-picker>
          </el-col>
        </el-form-item>
        <el-form-item label="供应厂商:">
          <el-select v-model="caigou.gongyingshang" placeholder="供应厂商">
            <el-option label="供应厂商A" value="A"></el-option>
            <el-option label="供应厂商B" value="B"></el-option>
            <el-option label="供应厂商C" value="C"></el-option>
            <el-option label="供应厂商D" value="D"></el-option>
            <el-option label="供应厂商E" value="E"></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="采购状态:">
          <el-select v-model="caigou.state" placeholder="全部">
            <el-option label="待审批" value="daishenpi"></el-option>
            <el-option label="已通过" value="yitongguo"></el-option>
            <el-option label="不通过" value="butongguo"></el-option>
            <el-option label="已入库" value="yiruku"></el-option>
          </el-select>
        </el-form-item>
      </el-form>
    </div>
  </div>
</template>
<script>
export default {
  name: "ShaixuanTwo",
  data() {
    return {
      tab: true,
      caigou: {
        date1: "",
        date2: "",
        gongyingshang: "",
        state: "",
      },
    };
  },
  methods: {
    shouqi() {
      this.tab = !this.tab;
    },
    sel() {
      this.$emit("sss");
    },
  },
  mounted() {
    console.log(1);
  },
};
</script>
<style lang="scss" scoped>
.header {
  border: 1px solid rgb(217, 217, 217);

  & .employees-header {
    height: 60px;
    line-height: 60px;
    padding: 0 20px;
    border: 1px solid rgb(217, 217, 217);
    background-color: rgb(232, 232, 232);
    border-bottom: none;
  }
  & .header-left {
    float: left;
  }
  & .header-right {
    float: right;
  }
  & .header-from {
    padding: 0 50px;
    height: 0px;
    overflow: hidden;
    transition: all 0.5s;
  }
  & .header-from1 {
    height: 60px;
  }
  & .demo-form-inline {
    margin-top: 10px;
  }
  & .shou {
    cursor: pointer;
    margin-right: 20px;
  }
}
</style>